package com.ruoyi.boss.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.boss.mapper.TCancelMapper;
import com.ruoyi.boss.domain.TCancel;
import com.ruoyi.boss.service.ITCancelService;

/**
 * 取消订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-17
 */
@Service
public class TCancelServiceImpl implements ITCancelService 
{
    @Autowired
    private TCancelMapper tCancelMapper;

    /**
     * 查询取消订单
     * 
     * @param cancelId 取消订单主键
     * @return 取消订单
     */
    @Override
    public TCancel selectTCancelByCancelId(Long cancelId)
    {
        return tCancelMapper.selectTCancelByCancelId(cancelId);
    }

    /**
     * 查询取消订单列表
     * 
     * @param tCancel 取消订单
     * @return 取消订单
     */
    @Override
    public List<TCancel> selectTCancelList(TCancel tCancel)
    {
        return tCancelMapper.selectTCancelList(tCancel);
    }

    /**
     * 新增取消订单
     * 
     * @param tCancel 取消订单
     * @return 结果
     */
    @Override
    public int insertTCancel(TCancel tCancel)
    {
        return tCancelMapper.insertTCancel(tCancel);
    }

    /**
     * 修改取消订单
     * 
     * @param tCancel 取消订单
     * @return 结果
     */
    @Override
    public int updateTCancel(TCancel tCancel)
    {
        return tCancelMapper.updateTCancel(tCancel);
    }

    /**
     * 批量删除取消订单
     * 
     * @param cancelIds 需要删除的取消订单主键
     * @return 结果
     */
    @Override
    public int deleteTCancelByCancelIds(Long[] cancelIds)
    {
        return tCancelMapper.deleteTCancelByCancelIds(cancelIds);
    }

    /**
     * 删除取消订单信息
     * 
     * @param cancelId 取消订单主键
     * @return 结果
     */
    @Override
    public int deleteTCancelByCancelId(Long cancelId)
    {
        return tCancelMapper.deleteTCancelByCancelId(cancelId);
    }
}
